<template>
  <simple-layout title="理财NGT转账记录">
    <div class="content">
      <div class="time-lists" v-for="item in  transferList">
        <div class="time-title">
          <span>转账类型：{{item.transferType}}</span>
          <span class="out">{{item.ngtType===1?'转出':'转出'}}</span>
        </div>
        <div>
          <div class="money-title">
            <div class="money-name">{{item.otherName}}</div>
            <div>{{item.createTime}}</div>
          </div>
          <div class="money">+{{item.amount}}</div>
        </div>
      </div>
    </div>
  </simple-layout>
</template>

<script>
  import SimpleLayout from "../../components/SimpleLayout";
  import PayService from '../../service/pay';

  export default {
    name: "Login",
    components: {
      //someComponent
      SimpleLayout
    },
    props: {},
    data() {
      return {
        msg: "Hello Vue.js",
        transferfilter:{
          pageSize:10,
          pageNum:1
        },
        transferList:[]
      };
    },
    computed: {},
    watch: {},
    mounted: function() {
      this.getProductList()
    },
    methods: {
      getProductList(){
        PayService.transferList(this.transferfilter).then(res=>{
          if(res.status == 200){
            this.transferList = this.transferList.concat(res.resultData.list);
            console.log(this.transferList)
          }
        })
      }
    }
  };
</script>


<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.content {
  height: 100vh;
  background-color: #f3f4f6;
}
.time-lists {
  border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  margin-bottom: 10px;
  padding: 0 10px 10px 10px;
  color: #999;
  background-color: #fff;
}

div.time-lists {
  border-top: 1px solid rgba(153, 153, 153, 0.5);
}

.time-title {
  border-bottom: 1px solid rgba(153, 153, 153, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.time-title + div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  line-height: 2;
}

.money-title{
  text-align: left;
}

.money-name {
  color: #333;
  font-size: 16px;
  font-weight: bold;
}

.money {
  color: #333;
  font-size: 20px;
  font-weight: bold;
}

.out {
  color: red;
  font-size: 16px;
  font-weight: bold;
}

.in {
  color: #3885FF;
  font-size: 16px;
  font-weight: bold;
}
</style>
